Package com.cisco.pt.ptmp.impl
Class PacketTracerSessionFactoryImpl
java.lang.Object
com.cisco.pt.ptmp.impl.PacketTracerSessionFactoryImpl
- All Implemented Interfaces:
PacketTracerSessionFactory
- Direct Known Subclasses:
PacketTracerMUSessionFactoryImpl
- Author:
- packettracerexapps@external.cisco.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static PacketTracerSessionFactoryprotected static org.apache.commons.logging.Logprotected List<PacketTracerSession> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Attempts to close all open PT sessionsstatic PacketTracerSessionFactoryopenSession(String host, int port) openSession(String host, int port, ConnectionNegotiationProperties connectionNegotiationProperties) int
-
Field Details
-
logger
protected static org.apache.commons.logging.Log logger -
instance
-
openSessions
-
-
Constructor Details
-
PacketTracerSessionFactoryImpl
protected PacketTracerSessionFactoryImpl()private constructor
-
-
Method Details
-
getInstance
- Returns:
- a PacketTracerSessionFactory singleton
-
close
Description copied from interface:PacketTracerSessionFactoryAttempts to close all open PT sessions- Specified by:
closein interfacePacketTracerSessionFactory- Throws:
IOException- The exception
-
openSession
public PacketTracerSession openSession(String host, int port, ConnectionNegotiationProperties connectionNegotiationProperties) throws IOException - Specified by:
openSessionin interfacePacketTracerSessionFactory- Parameters:
host- Stringport- intconnectionNegotiationProperties- The properties- Returns:
- a new
PacketTracerSession - Throws:
IOException- The exception
-
openSession
- Specified by:
openSessionin interfacePacketTracerSessionFactory- Parameters:
host- Stringport- int- Returns:
- a new
PacketTracerSession - Throws:
IOException- The exception
-
openSessionCount
- Specified by:
openSessionCountin interfacePacketTracerSessionFactory- Returns:
- number of open sessions
- Throws:
IOException- the exception
-